package com.example.demo.controller

import com.example.demo.dao.*
import com.example.demo.model.*
import org.springframework.beans.factory.annotation.*
import org.springframework.web.bind.annotation.*

@RestController
class ArticleController {
    @Autowired
    lateinit var articleRepository: ArticleRepository

    // 此接口的测试在 “接口测试/Article-api.http”文件
    @RequestMapping("/test")
    fun testArticle(): List<Article> {
        return articleRepository.findAll()
    }
}